package com.raft.kvstore.message;

import java.io.Serializable;

/**处理异常情况下的get响应<br/>
 * 异常码		描述<br/>
 * 100		通用异常<br/>
 * 101		超时
 * @author zhangsulei
 *
 */
public class Failure implements Serializable {

    /**
	 *
	 */
	private static final long serialVersionUID = -5506031331593783254L;
	private final int errorCode;
    private final String message;

    public Failure(int errorCode, String message) {
        this.errorCode = errorCode;
        this.message = message;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "Failure{" + "errorCode=" + errorCode + ", message='" + message + "'}";
    }

}
